package com.example.auth.runner;

import com.example.auth.service.ClientService;
import com.example.auth.service.ClientServiceService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * Created by wangtao on 2018/3/4.
 */
@Component
public class CommandLineRunnerImpl implements CommandLineRunner {

    private static final Logger logger = Logger.getLogger(CommandLineRunnerImpl.class);

    @Autowired
    private ClientService clientService;
    @Autowired
    private ClientServiceService clientServiceService;

    @Override
    public void run(String... args) throws Exception {
        clientService.synClientCache();
        clientServiceService.synClientServiceCache();
    }
}
